<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/3
 * Time: 10:53
 */

namespace App\Http\Transformers\User;

use League\Fractal\TransformerAbstract;
use App\Models\User;

class CurrentUserTransformer extends TransformerAbstract
{
    public function transform(User $user)
    {
//        $data['permissions'] = $user->getAllPermissions()->toArray();
//        $data['role'] = $user->getRoleNames()->toArray();

        $data = $user->toArray();

        return $data;
    }
}
